package week11;

public class MyRunnable implements Runnable {
	

	public void run() {
		for (int i = 0; i < 10; i++) {
			try {
				Thread.sleep(100);
			} catch (Exception e) {
			}
			System.out.println(Thread.currentThread().getName() + " " + i);
		}
	}

	public static void main(String args[]) {
		MyRunnable mr = new MyRunnable();
		Thread t1 = new Thread(mr); // Thread(Runnable r)
		Thread t2 = new Thread(mr);
		t1.start();
		t2.start();
	}
}
